/**
 * $Revision: 1.0 $
 * $Author: Eric Yang $
 * $Date: Aug 24, 2009 11:25:49 PM $
 *
 * Author: Eric Yang
 * Date  : Aug 24, 2009 11:25:49 PM
 *
 */
package com.gooex.service.base;

import java.util.List;
import org.c4j.system.web.exception.ServiceException;

import com.gooex.domain.base.Category;
import com.gooex.service.base.exception.CategoryException;

/**
 * @author Eric Yang
 * @version 1.0
 */
public interface ICategoryManager {
	/***/
	public Category getCategory(String id);

	public Category assertCategory(String id);

	/***/
	public Category getCategoryByName(String name);

	/**
	 * @throws ServiceException
	 *             TODO
	 */
	public void saveCategory(Category category) throws ServiceException;

	/***/
	public void removeCategory(Category category) throws CategoryException;

	/***/
	public List<Category> getCategorys();

	/***/
	public List<Category> getCategories(Category parent);

	public List<Category> getMenuTopCategories();

	public List<Category> getCategories(Category parent, int num);

	public List<Category> getSubCategoriesByName(Category parent, String name);

	public List<Category> getCateChildren(String id);

	public void increaseCount(Category category, String string);

	public void decreaseCount(Category category, String region);

}
